<!DOCTYPE HTML>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,aItemress=no">
		<title>确认订单</title>
		<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
		<link rel="stylesheet" type="text/css" href="../../css/app.css" />
		<style type="text/css">
			.aui-title {
				font-size:.9rem;
				font-family:PingFangSC-Regular;
				font-weight:400;
			}
			.aui-text-linear{color:#fff}
			.create-order-footer {
				background-color: #FFFFFF;
				height: 2.45rem;
				line-height: 2.45rem;
				text-align: center;
				width: 100%;
				position: fixed;
				bottom: 0rem;
				display: flex;
				-webkit-flex-direction: row;
				flex-direction: row;
				-webkit-align-items: center;
				align-items: center;
			}
			.linears {
				background:linear-gradient(135deg,rgba(132,229,255,1) 0%,rgba(107,180,255,1) 100%,rgba(122,174,229,1) 100%);
				/*border-radius:4px;*/
			}

			.handle {
				flex:7;
				display:inline-block;
				height:100%;
				width:100%;
				padding-left:.75rem;
				padding-top:0rem;
				font-size:.75rem;
				font-family:PingFangSC-Regular;
				font-weight:400;
				color:rgba(51,51,51,1);
				text-align:left;
			}

			.handle>span:nth-child(1) {
				font-size:1rem;
				color:#FF6642;
				font-weight:Semibold;
				font-family:Akrobat Bold Regular;
			}
			.handle>span:nth-child(2) {
				font-size:1.1rem;
				color:#FF6642;
				font-family:Akrobat Bold Regular;
				font-weight:Bold;
			}

			.submit {

				display:inline-block;
				width:5.5rem;
				background:rgba(247,48,36,1);
				font-size:.8rem;
				font-family:PingFangSC-Regular;
				font-weight:400;
				color:rgba(255,255,255,1);
				margin-right:0.65rem;
				border-radius:2.5rem;
				height:1.8rem;
				 line-height: 1.8rem;;
			}

			.grey{
				background:#999
			}
		</style>
	</head>

	<body>
		<div id="aui-header" class="ming-bg-blue">
			<header class="aui-bar aui-bar-nav ming-bg-blue aui-border-b">
				<a class="aui-pull-left" tapmode onclick="close_win()" style="margin-left:.75rem;padding:0;">
					<img class="btn-img-back" src="../../image/btn/btn-back.png" />
				</a>
				<div class="aui-title">
					<div class="aui-text-linear" v-if="is_used_score=='0'">
						确认订单
					</div>
					<div class="aui-text-linear" v-else>
						积分不足
					</div>
				</div>
			</header>

		</div>

		<!-- 提交订单 -->
		<div class="create-order-footer" id="aui-footer" v-cloak="">
				<div class="handle">
						应付：
						<span style="font-size:1rem;color:#FF6642;font-family:PingFangSC-Semibold;font-weight:400;">￥<span style="font-size:1.1rem;font-family:Akrobat-Bold!important;">
							{{amount}}
						</span></span>

				</div>
				<div class="submit" tapmode onclick="createOrder()" v-if="is_used_score==1">
						确认兑换
				</div>
				<div class="submit grey" tapmode v-else>
						积分不足
				</div>
		</div>
	</body>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/vue.js"></script>
	<script type="text/javascript" src="../../script/common.js"></script>
	<script>
		var vm = new Vue({
		     el:"#aui-footer",
		     data:{
		        amount:0,
						is_used_score:0
		     },
		     methods:{
		        price_format: function(type, price) {
						var status = (price + '').indexOf('.')
						if(status == '-1') {
							if(type == 'yuan') {
								return price;
							}
							if(type == 'fen') {
								return '00';
							}
						}
						var price_array = (price + '').split('.')
						if(type == 'yuan') {
							return price_array[0];
						}
						if(type == 'fen') {
							var price_fen = price_array[1].length < 2 ? price_array[1] + '0' : price_array[1];
							return price_fen;
						}
				}
		     }
		  })

		apiready = function() {
			$api.fixStatusBar($api.byId('aui-header'))
			open_frame_f('create_score_f', 'create_score_f.html', 'aui-header', 'aui-footer', false)
			add_event('order_amount',function(ret){
				vm.amount = ret.amount
				vm.is_used_score = ret.is_used_score
			})
		};
		function createOrder(){
			refreshFrame('create_score_f','createOrder()')
		}
	</script>

</html>
